package com.dragon.modules.yuegou.query.coupon;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.coupon.CouponTemplateRandomEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 随机券信息 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2020-07-09 15:00:59
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class CouponTemplateRandomQuery extends CouponTemplateRandomEntity implements Query<CouponTemplateRandomEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 券模板ID查询条件 */
	@JsonUnwrapped(prefix = "couponTemplateId")
	private Condition<String> couponTemplateIdCondition;

    /** 开始金额查询条件 */
	@JsonUnwrapped(prefix = "beginFee")
	private Condition<BigDecimal> beginFeeCondition;

    /** 结束金额查询条件 */
	@JsonUnwrapped(prefix = "endFee")
	private Condition<BigDecimal> endFeeCondition;

    /** 随机券总和最高金额限制查询条件 */
	@JsonUnwrapped(prefix = "limitMaxFee")
	private Condition<BigDecimal> limitMaxFeeCondition;

    /** 当前已领取总金额查询条件 */
	@JsonUnwrapped(prefix = "nowFee")
	private Condition<BigDecimal> nowFeeCondition;

    /** 随机券总和最高数量限制查询条件 */
	@JsonUnwrapped(prefix = "limitMaxNum")
	private Condition<Integer> limitMaxNumCondition;

    /** 当前已领取总数量查询条件 */
	@JsonUnwrapped(prefix = "nowNum")
	private Condition<Integer> nowNumCondition;

    /** 是否有效：0-false失效、1-true正常【当随机段超出领取数量或最高金额时失效】查询条件 */
	@JsonUnwrapped(prefix = "validStatus")
	private Condition<Boolean> validStatusCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 修改时间查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public CouponTemplateRandomQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public CouponTemplateRandomQuery(CouponTemplateRandomEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public CouponTemplateRandomQuery(CouponTemplateRandomQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.couponTemplateIdCondition != null) {
			this.couponTemplateIdCondition = other.couponTemplateIdCondition.copy();
		}
		if(other.beginFeeCondition != null) {
			this.beginFeeCondition = other.beginFeeCondition.copy();
		}
		if(other.endFeeCondition != null) {
			this.endFeeCondition = other.endFeeCondition.copy();
		}
		if(other.limitMaxFeeCondition != null) {
			this.limitMaxFeeCondition = other.limitMaxFeeCondition.copy();
		}
		if(other.nowFeeCondition != null) {
			this.nowFeeCondition = other.nowFeeCondition.copy();
		}
		if(other.limitMaxNumCondition != null) {
			this.limitMaxNumCondition = other.limitMaxNumCondition.copy();
		}
		if(other.nowNumCondition != null) {
			this.nowNumCondition = other.nowNumCondition.copy();
		}
		if(other.validStatusCondition != null) {
			this.validStatusCondition = other.validStatusCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<CouponTemplateRandomEntity> toQueryWrapper() {
		QueryWrapper<CouponTemplateRandomEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (couponTemplateIdCondition != null) {
			couponTemplateIdCondition.toWrapper(wrapper, COL_COUPON_TEMPLATE_ID);
		}
		if (beginFeeCondition != null) {
			beginFeeCondition.toWrapper(wrapper, COL_BEGIN_FEE);
		}
		if (endFeeCondition != null) {
			endFeeCondition.toWrapper(wrapper, COL_END_FEE);
		}
		if (limitMaxFeeCondition != null) {
			limitMaxFeeCondition.toWrapper(wrapper, COL_LIMIT_MAX_FEE);
		}
		if (nowFeeCondition != null) {
			nowFeeCondition.toWrapper(wrapper, COL_NOW_FEE);
		}
		if (limitMaxNumCondition != null) {
			limitMaxNumCondition.toWrapper(wrapper, COL_LIMIT_MAX_NUM);
		}
		if (nowNumCondition != null) {
			nowNumCondition.toWrapper(wrapper, COL_NOW_NUM);
		}
		if (validStatusCondition != null) {
			validStatusCondition.toWrapper(wrapper, COL_VALID_STATUS);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回券模板ID查询条件
	 * 
	 * @return couponTemplateIdCondition 券模板ID查询条件
	 */
	public Condition<String> couponTemplateId() {
		this.couponTemplateIdCondition = new Condition<>();
		return this.couponTemplateIdCondition;
	}
	
	/**
	 * 获取券模板ID查询条件
	 * 
	 * @return couponTemplateIdCondition 券模板ID查询条件
	 */
	public Condition<String> getCouponTemplateIdCondition() {
		return couponTemplateIdCondition;
	}

	/**
	 * 设置券模板ID查询条件
	 * 
	 * @param couponTemplateIdCondition 券模板ID查询条件
	 */
	public void setCouponTemplateIdCondition(Condition<String> couponTemplateIdCondition) {
		this.couponTemplateIdCondition = couponTemplateIdCondition;
	}

	/**
	 * 构造并返回开始金额查询条件
	 * 
	 * @return beginFeeCondition 开始金额查询条件
	 */
	public Condition<BigDecimal> beginFee() {
		this.beginFeeCondition = new Condition<>();
		return this.beginFeeCondition;
	}
	
	/**
	 * 获取开始金额查询条件
	 * 
	 * @return beginFeeCondition 开始金额查询条件
	 */
	public Condition<BigDecimal> getBeginFeeCondition() {
		return beginFeeCondition;
	}

	/**
	 * 设置开始金额查询条件
	 * 
	 * @param beginFeeCondition 开始金额查询条件
	 */
	public void setBeginFeeCondition(Condition<BigDecimal> beginFeeCondition) {
		this.beginFeeCondition = beginFeeCondition;
	}

	/**
	 * 构造并返回结束金额查询条件
	 * 
	 * @return endFeeCondition 结束金额查询条件
	 */
	public Condition<BigDecimal> endFee() {
		this.endFeeCondition = new Condition<>();
		return this.endFeeCondition;
	}
	
	/**
	 * 获取结束金额查询条件
	 * 
	 * @return endFeeCondition 结束金额查询条件
	 */
	public Condition<BigDecimal> getEndFeeCondition() {
		return endFeeCondition;
	}

	/**
	 * 设置结束金额查询条件
	 * 
	 * @param endFeeCondition 结束金额查询条件
	 */
	public void setEndFeeCondition(Condition<BigDecimal> endFeeCondition) {
		this.endFeeCondition = endFeeCondition;
	}

	/**
	 * 构造并返回随机券总和最高金额限制查询条件
	 * 
	 * @return limitMaxFeeCondition 随机券总和最高金额限制查询条件
	 */
	public Condition<BigDecimal> limitMaxFee() {
		this.limitMaxFeeCondition = new Condition<>();
		return this.limitMaxFeeCondition;
	}
	
	/**
	 * 获取随机券总和最高金额限制查询条件
	 * 
	 * @return limitMaxFeeCondition 随机券总和最高金额限制查询条件
	 */
	public Condition<BigDecimal> getLimitMaxFeeCondition() {
		return limitMaxFeeCondition;
	}

	/**
	 * 设置随机券总和最高金额限制查询条件
	 * 
	 * @param limitMaxFeeCondition 随机券总和最高金额限制查询条件
	 */
	public void setLimitMaxFeeCondition(Condition<BigDecimal> limitMaxFeeCondition) {
		this.limitMaxFeeCondition = limitMaxFeeCondition;
	}

	/**
	 * 构造并返回当前已领取总金额查询条件
	 * 
	 * @return nowFeeCondition 当前已领取总金额查询条件
	 */
	public Condition<BigDecimal> nowFee() {
		this.nowFeeCondition = new Condition<>();
		return this.nowFeeCondition;
	}
	
	/**
	 * 获取当前已领取总金额查询条件
	 * 
	 * @return nowFeeCondition 当前已领取总金额查询条件
	 */
	public Condition<BigDecimal> getNowFeeCondition() {
		return nowFeeCondition;
	}

	/**
	 * 设置当前已领取总金额查询条件
	 * 
	 * @param nowFeeCondition 当前已领取总金额查询条件
	 */
	public void setNowFeeCondition(Condition<BigDecimal> nowFeeCondition) {
		this.nowFeeCondition = nowFeeCondition;
	}

	/**
	 * 构造并返回随机券总和最高数量限制查询条件
	 * 
	 * @return limitMaxNumCondition 随机券总和最高数量限制查询条件
	 */
	public Condition<Integer> limitMaxNum() {
		this.limitMaxNumCondition = new Condition<>();
		return this.limitMaxNumCondition;
	}
	
	/**
	 * 获取随机券总和最高数量限制查询条件
	 * 
	 * @return limitMaxNumCondition 随机券总和最高数量限制查询条件
	 */
	public Condition<Integer> getLimitMaxNumCondition() {
		return limitMaxNumCondition;
	}

	/**
	 * 设置随机券总和最高数量限制查询条件
	 * 
	 * @param limitMaxNumCondition 随机券总和最高数量限制查询条件
	 */
	public void setLimitMaxNumCondition(Condition<Integer> limitMaxNumCondition) {
		this.limitMaxNumCondition = limitMaxNumCondition;
	}

	/**
	 * 构造并返回当前已领取总数量查询条件
	 * 
	 * @return nowNumCondition 当前已领取总数量查询条件
	 */
	public Condition<Integer> nowNum() {
		this.nowNumCondition = new Condition<>();
		return this.nowNumCondition;
	}
	
	/**
	 * 获取当前已领取总数量查询条件
	 * 
	 * @return nowNumCondition 当前已领取总数量查询条件
	 */
	public Condition<Integer> getNowNumCondition() {
		return nowNumCondition;
	}

	/**
	 * 设置当前已领取总数量查询条件
	 * 
	 * @param nowNumCondition 当前已领取总数量查询条件
	 */
	public void setNowNumCondition(Condition<Integer> nowNumCondition) {
		this.nowNumCondition = nowNumCondition;
	}

	/**
	 * 构造并返回是否有效：0-false失效、1-true正常【当随机段超出领取数量或最高金额时失效】查询条件
	 * 
	 * @return validStatusCondition 是否有效：0-false失效、1-true正常【当随机段超出领取数量或最高金额时失效】查询条件
	 */
	public Condition<Boolean> validStatus() {
		this.validStatusCondition = new Condition<>();
		return this.validStatusCondition;
	}
	
	/**
	 * 获取是否有效：0-false失效、1-true正常【当随机段超出领取数量或最高金额时失效】查询条件
	 * 
	 * @return validStatusCondition 是否有效：0-false失效、1-true正常【当随机段超出领取数量或最高金额时失效】查询条件
	 */
	public Condition<Boolean> getValidStatusCondition() {
		return validStatusCondition;
	}

	/**
	 * 设置是否有效：0-false失效、1-true正常【当随机段超出领取数量或最高金额时失效】查询条件
	 * 
	 * @param validStatusCondition 是否有效：0-false失效、1-true正常【当随机段超出领取数量或最高金额时失效】查询条件
	 */
	public void setValidStatusCondition(Condition<Boolean> validStatusCondition) {
		this.validStatusCondition = validStatusCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return createdByCondition 查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return createdByCondition 查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param createdByCondition 查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回修改时间查询条件
	 * 
	 * @return modifiedTimeCondition 修改时间查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取修改时间查询条件
	 * 
	 * @return modifiedTimeCondition 修改时间查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置修改时间查询条件
	 * 
	 * @param modifiedTimeCondition 修改时间查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

}
